FROM jupyter/minimal-notebook:619e9cc2fc07
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
COPY . ${HOME}
USER root
RUN apt update -qq && apt install apt-utils curl ffmpeg gdebi -qqy
RUN wget 'https://mega.nz/linux/MEGAsync/xUbuntu_18.04/amd64/megacmd_1.2.0-10.1_amd64.deb' -O megacmd.deb && yes y | gdebi megacmd.deb || true
RUN wget 'https://downloads.rclone.org/v1.51.0/rclone-v1.51.0-linux-amd64.deb' -O rclone.deb && yes y | gdebi rclone.deb
RUN pip install requests streamlink ruamel.yaml youtube_dl
RUN chown -R ${NB_UID} ${HOME}
RUN echo '%users ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER ${NB_USER}
